home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
intrfc61.arc
/
INTRFC.DOC
< prev
next >
Wrap
Text File
|
1991-03-28
|
5KB
|
116 lines
INTRFC - Program to dump TPU files. (Dec, 1990)
Version 1.31: Dumps TP 6.0 format files.
Written for the public domain by D.J. Murdoch (CIS 71631,122 or
Fidonet 1:221/177.40)
INTRODUCTION
I started INTRFC because I got a library of Turbo Pascal 4.0
subroutines which had some errors in the documentation. One of
the functions wanted its arguments to be a special type, but the
doc's didn't tell me which one. TP gave me an error message
saying I wasn't using the right type, but wouldn't tell me which
one to use either. I decided to decode the TPU file and figure
out what TP wanted. Once I got started, it was hard to stop.
So, I ended up writing INTRFC, which printed out almost all the
information you'll ever need about the interface to a TPU unit.
I decided to upgrade INTRFC to TP 5.5 files last year, and
got carried away again. Version 1.2 dumped the complete file, not just
the interface section.
The recent release of TP 6.0 made it necessary to upgrade again.
This one was easy: there aren't very many differences between version
5.5 and 6.0 .TPU files. I decided to fill in the couple of gaps in
version 1.2, and the current one dumps everything in the file.
However, I made a few mistakes in release 1.3; this version 1.31 fixes
those.
Because of the way INTRFC has been written, i.e. entirely by
guesswork, there are probably numerous special cases that it doesn't
handle properly. That's one reason the source code is there - so
other people can fix up my mistakes. (And if you do, please tell me -
that's how I found the bugs that version 1.31 fixes.)
The other reason I included source code is because it will
serve as a bit of documentation for the TPU file format: Borland
will never publish it. They want to be free to change the format,
making INTRFC obsolete whenever a new TP arrives. Others who want to
do completely different things to a TPU file may benefit from reading
it. (The other difficulty with a program written the way this one was
is that comments are almost non-existent. If you have any short
questions about it that you can't figure out, send them to me at one
of the addresses above.)
USAGE:
INTRFC /options unit
where options are letters from the following:
B - emitted code Bytes
C - initialized Constant blocks
D - coDe blocks
E - routine Entry records
G - emitted Global const bytes
H - TPU Header
I - Implementation section (if $D was used in compilation)
L - proc/fn Locals (if $L was used in compilation)
M - source line number map (NEW!)
N - Names in interface
O - Object VMT records
R - Relocation records
S - source file records (NEW!)
V - Var blocks
X - mystery section (default on - NEW!)
A - turn All options on
Tpath - set the Turbo directory, where the TURBO.TPL and referenced
units are kept
Options are processed sequentially and toggle the display.
E.G. To see all but the relocation records in the system unit, use
INTRFC /AR /T\turbo SYSTEM
The default is just the names in the interface section.
LIMITATIONS
There are tons of limitations to INTRFC. It doesn't know how
to print any but the simplest types of constants. It won't print
the values of typed constants. Etc. Etc. Etc. If you want it to
do something differently just go ahead and change it! I
recommend compiling with all possible checks turned on, since
it's pretty easy to get lost in all those pointers.
FILES
The following files should be included in this package.
INTRFC DOC 4948 27-03-91 11:15p This file
TPU60 DOC 3793 19-12-90 8:27p TPU structure outline
INTRFC EXE 50160 27-03-91 11:09p The executable
INTRFC PAS 3567 27-03-91 10:56p Main program
GLOBALS PAS 1026 19-12-90 7:52p Program globals
HEAD PAS 2752 19-12-90 7:53p TPU header dumper
NAMELIST PAS 19415 18-12-90 10:51p Prints interface section
NAMETYPE PAS 2876 12-03-91 8:56p Type definitions for NAMELIST
BLOCKS PAS 5437 19-12-90 8:23p Routines for code blocks, etc.
SRCFILES PAS 3758 18-12-90 10:54p Prints source files & line numbers
RELOC PAS 3638 25-02-90 10:31a Prints relocation records
CODE PAS 1313 25-02-90 8:09p Code and const dumper
DUMP PAS 2370 19-12-90 7:54p Various dump routines
LOADER PAS 5439 27-03-91 11:08p Reads in .TPU and .TPL files
UTIL PAS 6620 15-12-90 10:05a Various utility routines
TEST1 PAS 1316 12-03-91 8:39p Test file
TEST1 INC 104 18-12-90 9:41p Test include file
PARAMS PAS 3192 11-03-91 6:30p Parses parameters
THAT'S IT!
Have fun with INTRFC and Turbo Pascal. I'd like to hear of
any novel uses.
D.J. Murdoch